package core.field;

import core.Player;
import core.PopUpTax;

public class Tax extends Field {
	
	private int taxAmount = 4000;
	private int taxRate = 10;
	
	public Tax(String name, int tax){
		this.setName(name);
		taxAmount = tax;
	}

	public Tax() {
		
	}

	@Override
	public void landOnField(Player player) {
		if(new PopUpTax().payTaxQ())
			player.getKonto().withdrawPoints((player.getPoints()/taxRate));
		else
			player.getKonto().withdrawPoints(taxAmount);
		
	}

	@Override
	public String subText() {
		String temp;
		temp = "taxes gotta be paid..." + taxAmount;
		return temp;
	}
	
	
}
